﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;
using System.Text.Json.Serialization;
using Digitalmes.Model;
using Digitalmes.Model.EquipmentManagement;

namespace Digitalmes.Model.EquipmentManagement
{
    /// <summary>
    /// 点检项目
    /// </summary>
	[Table("EquipmentSpotItem")]

    [Display(Name = "_Model.EquipmentSpotItem")]
    public class EquipmentSpotItem : BasePoco,IPersistPoco,ITenant
    {
        [Key]
        [Display(Name = "_Model._EquipmentSpotItem._ID")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public new long ID { get; set; }
        [Display(Name = "_Model._EquipmentSpotItem._SpotType")]
        [Comment("点检类型")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public SpotTypeEnum? SpotType { get; set; }
        [Display(Name = "_Model._EquipmentSpotItem._Content")]
        [Comment("点检内容")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public string Content { get; set; }
        [Display(Name = "_Model._EquipmentSpotItem._Template")]
        [Comment("模板")]
        public EquipmentSpotTemplate Template { get; set; }
        [Display(Name = "_Model._EquipmentSpotItem._Template")]
        [Comment("模板")]
        public long? TemplateId { get; set; }
        [Display(Name = "_Model._EquipmentSpotItem._Active")]
        [Comment("激活")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public bool? Active { get; set; }
        [Display(Name = "_Model._EquipmentSpotItem._IsValid")]
        [Comment("是否有效")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public bool IsValid { get; set; } = true;
        [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
        public string TenantCode { get; set; }

	}

}
